-- GENERATED SPELL FOR [Vault Warder] --


function spell0_10120(pUnit, Event) --@Earthen Guards Destroyed,n/a--
pUnit:FullCastSpellOnTarget(10666,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10120', 621, 1)
end

function spell1_10120(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_10120', 530, 1)
end

function Sorts_10120(pUnit, Event)
local choix_sorts_10120 = math.random(0, 1)
if choix_sorts_10120 == 0 then
pUnit:RegisterEvent('spell0_10120', 1, 1)
end
if choix_sorts_10120 == 1 then
pUnit:RegisterEvent('spell1_10120', 1, 1)
end
end

function mob10120_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10120', math.random(1500, 3000), 1)
end

function mob10120_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10120_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10120_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10120, 1, 'mob10120_Action')
RegisterUnitEvent(10120, 2, 'mob10120_Leave')
RegisterUnitEvent(10120, 3, 'mob10120_Kill')
RegisterUnitEvent(10120, 4, 'mob10120_Die')
